package com.yyaccp.appinfo.controller;

import com.yyaccp.appinfo.service.DataService;
import com.yyaccp.appinfo.util.AjaxResult;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/api/data")
public class DataController {
    @Resource
    private DataService dataService;

    @RequestMapping("/search")
    public AjaxResult search(String typeCode){
        return AjaxResult.success(dataService.selectByTypeCode(typeCode)
        );
    }
}
